﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SLSYJ.Core;
using System.ComponentModel.DataAnnotations;

namespace SLSYJ.Controllers.DTOs
{
    public class EmployeeDTO
    {
        public EmployeeDTO()
        {
            this.HiringDate = DateTime.Today;
            this.DateOfBirth = DateTime.Today;
            this.EmployeeBank = new BankDTO();
            this.Category = new EmployeeCategoryDTO();
            this.CateorySector = new SectorDTO();
        }

        public int ID { get; set; }

        [Required]
        [Display(Name = "Nombre")]
        public string Name { get; set; }

        [Required]
        [Display(Name = "Apellido")]
        public string Surname { get; set; }

        [Required]
        [Display(Name = "Número de empleado")]
        public string FileNumber { get; set; }

        [Required]
        [Display(Name = "Número de DNI")]
        public string DNInumber { get; set; }

        [Required]
        [Display(Name = "Número de CUIL")]
        public string CUILnumber { get; set; }

        [DataType(DataType.DateTime)]
        [Display(Name = "Fecha de ingreso")]
        public DateTime HiringDate { get; set; }

        [DataType(DataType.DateTime)]
        [Display(Name = "Fecha de nacimiento")]
        public DateTime DateOfBirth { get; set; }

        [DataType(DataType.Currency)]
        [Display(Name = "Salario")]
        public decimal Salary { get; set; }

        [DataType(DataType.Currency)]
        [Display(Name = "Salario remunerativo")]
        public decimal RemunerativeSalary { get; set; }

        [DataType(DataType.Currency)]
        [Display(Name = "Salario NO remunerativo")]
        public decimal NonRemunerativeSalary { get; set; }

        public IList<Year> Years { get; set; }

        [Required]
        [Display(Name = "Categoria")]
        public EmployeeCategoryDTO Category { get; set; }

        [Required]
        [Display(Name = "Sector")]
        public SectorDTO CateorySector { get; set; }

        [Required]
        [Display(Name = "Sucursal")]
        public Branch SectorBranch { get; set; }

        public IList<Plus> Extras { get; set; }

        [Display(Name = "Estado civil")]
        public MaritalStatus MaritalStatus { get; set; }

        [Display(Name = "Sexo")]
        public Sex Sex { get; set; }

        [Display(Name = "Datos Bancarios")]
        public BankDTO EmployeeBank { get; set; }

        public IList<Parent> Parents { get; set; }

        [Display(Name = "Número de tarjeta")]
        public string CardNumber { get; set; }

        [Display(Name = "Tiene convenio?")]
        public bool HasAgreement { get; set; }

        [Display(Name = "Observaciones")]
        public string Comments { get; set; }

        [Display(Name = "Foto")]
        [UIHint("ProfileImage")]
        public string Picture { get; set; }
    }
}
